package com.example.moban.base;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @author huling
 * @date: 2018/12/3.
 */
public class BaseEvent<T> {

    private int code;
    //事件名称
    private String name;
    //事件数据内容
    private String conent;

    private T extra;
    private String babyName;

    public BaseEvent(){}

    public BaseEvent( int code , String name , String content , T extra ){
        this.code = code;
        this.name = name;
        this.conent = content;
        this.extra = extra;
    }

    public String getBabyName() {
        return babyName;
    }

    public void setBabyName(String babyName) {
        this.babyName = babyName;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public String getConent() {
        return conent;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setConent(String conent) {
        this.conent = conent;
    }

    public T getExtra() {
        return extra;
    }

    public void setExtra(T extra) {
        this.extra = extra;
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface EventCodeContains{
        int GET_BIND_NEW_PHONE = 1;
        int CLOSE_LOGIN_PAGE = 2;
        int REFRESH_MAIN_CLASS_CIRCLE = 3;
        int REFRESH_USER_INFO = 4;
        int REFRESH_MY_BABY_LIST = 5;
        int REFRESH_BABY_ADD_CLASS_CIRCLE_LIST = 6;
        int REFRESH_SELECT_ORGANIZATION = 7;
        int REFRESH_PLAY_INFO = 8;
        int FINISH_MAIN_ACTIVITY = 9;
        int TO_LIVE_LIST_PAGE = 10;
        int TO_PATRIARCH_COURSE_FRAGMENT = 11;
        int HUAN_XIN_REGIST = 12;
        int REFRESH_PATRIARCH_COURSE_FRAGMENT = 13;

        int RE_SET_YOUZAN_TOKEN = 14;
        int REFRESH_BABY_HEADER_IMG = 15;
        int MAIN_PAGE_CLOSE_PLAY = 16;
        int PAUSE_PLAY = 18;
        int RESUME_PLAY = 19;

        int CLOSE_KEYBORD = 17;
        int REFRESH_LIVE_FRAGMENT = 20;

        int TO_CLASSCRICLE_FRAGMENT = 21;

        int REFRESH_ARTICLE_VIDEO = 22;

        int REFRESH_PAY_RESULT = 23;

        int BABY_SELECT = 10001;
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface EventNameContains{

        String GET_BIND_NEW_PHONE = "GET_BIND_NEW_PHONE";
        String CLOSE_LOGIN_PAGE = "CLOSE_LOGIN_PAGE";
        String REFRESH_MAIN_CLASS_CIRCLE = "REFRESH_MAIN_CLASS_CIRCLE";
        String REFRESH_USER_INFO = "REFRESH_USER_INFO";
        String REFRESH_MY_BABY_LIST = "REFRESH_MY_BABY_LIST";
        String REFRESH_BABY_ADD_CLASS_CIRCLE_LIST = "REFRESH_BABY_ADD_CLASS_CIRCLE_LIST";
        String REFRESH_SELECT_ORGANIZATION = "REFRESH_SELECT_ORGANIZATION";
        String REFRESH_PLAY_INFO = "REFRESH_PLAY_INFO";
        String FINISH_MAIN_ACTIVITY = "FINISH_MAIN_ACTIVITY";
        String TO_LIVE_LIST_PAGE = "TO_LIVE_LIST_PAGE";
        String TO_PATRIARCH_COURSE_FRAGMENT = "TO_PATRIARCH_COURSE_FRAGMENT";
        String TO_CLASSCRICLE_FRAGMENT = "TO_CLASSCRICLE_FRAGMENT";
        String REFRESH_PAY_RESULT="REFRESH_PAY_RESULT";
        String HUAN_XIN_REGIST = "HUAN_XIN_REGIST";
        String REFRESH_PATRIARCH_COURSE_FRAGMENT = "REFRESH_PATRIARCH_COURSE_FRAGMENT";
        String RE_SET_YOUZAN_TOKEN = "RE_SET_YOUZAN_TOKEN";
        String REFRESH_BABY_HEADER_IMG = "REFRESH_BABY_HEADER_IMG";
        String MAIN_PAGE_CLOSE_PLAY = "MAIN_PAGE_CLOSE_PLAY";
        String CLOSE_KEYBORD = "CLOSE_KEYBORD";
        String PAUSE_PLAY = "PAUSE_PLAY";
        String RESUME_PLAY = "RESUME_PLAY";
        String REFRESH_LIVE_FRAGMENT = "REFRESH_LIVE_FRAGMENT";

        String BABY_SELECT = "BABY_SELECT";
        String REFRESH_ARTICLE_VIDEO = "REFRESH_ARTICLE_VIDEO";

    }
}